import request from '@/utils/request'

const api_name = '/api'


export default {
    // 获取验证码
    getCaptcha() {
        return request({
            url: `${api_name}/captcha/get`,
            method: 'get'
        })
    },
    // 获取验证码
    getPhoneCaptcha(phone) {
        return request({
            url: `${api_name}/captcha/sms/sendCode?phone=${phone}`,
            method: 'get'
        })
    },
    // 根据字典code获取字典列表
    getDictList(dictCode) {
        return request({
            url: `/sx/dictItem/dictList?dictCode=${dictCode}`,
            method: 'get'
        })
    },

    // 文件上傳
    fileUpload(form) {
        return request({
            url: `${api_name}/oss/fileUpload`,
            method: 'post',
            data:form

        })
    }, // 文件上傳
    fileUploads(form) {
        return request({
            url: `${api_name}/oss/uploadArrayFile`,
            method: 'post',
            data:form,
            headers:{'Content-Type':'multipart/form-data'}
        })
    },
/*
// 文件上傳
    fileUpload(form) {
        return request({
            url: `${api_name}/oss/fileUpload`,
            method: 'post',
            data:form

        })
    },
*/
    ossGetToken(){
        return request({
            url: `/oss/getOssToken`,
            method: 'get'
        })
    },

    // 获取任务标签
    getTagList(){
        return request({
            url: `/sx/tag/list`,
            method: 'get'
        })
    },


    // 首页轮播
    getLunboList(){
        return request({
            url:"/sx/swiper/list",
            method: 'get'
        })
    }  ,



    //加载题目
    getQuestList(){
        return request({
            url:"/sx/exam/list",
            method: 'get'
        })
    },



    //获取精拍单审核状态
    jingpaiGetLast(){
        return request({
            url:"/sx/jingpai/getLast",
            method: 'get'
        })
    } ,



    //提交精拍单
    submitJingpai(data){
        return request({
            url:"/sx/jingpai/submitJingpai",
            method: 'post',
            data:data
        })
    }
}


